<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <%@include file="/common/common.jspf"%>
</head>
<body>
<table class="table table-hover">
    <thead>
        <tr>
            <th>订单编号</th>
            <th>订购产品</th>
            <th>订购数量</th>
        </tr>
    </thead>
    <tbody>
    <c:forEach var="d" items="${data}">
        <tr onclick="getData(this)">
            <td>${d.ofcode}</td>
            <td>${d.stockid}</td>
            <td>${d.num}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>

<footer class="panel-footer text-right bg-light lter">
    <%--<button id="op_ok" type="submit" class="btn btn-success btn-s-xs">关闭页面</button>--%>
</footer>


<script type="text/javascript">

    $("#op_ok").click("click", function() {
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引  
        parent.layer.close(index);
    });
    function getData(data) {
        var tdArr = data.children;
        window.parent.inser_order(tdArr[0].innerHTML,tdArr[1].innerHTML);
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引  
        parent.layer.close(index);
    }
</script>
</body>

</html>